using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace tKitchen
{
    public partial class ShoppingList : Form
    {
        #region Properties
        
        public CheckBox CheckAll
        {
            get { return checkBoxAll; }
        }

        public DataGridView ItemList
        {
            get { return dataGridView1; }
        }

        public string Amount
        {
            get { return textBoxAmount.Text; }
            set { textBoxAmount.Text = value; }
        }
        public string Unit
        {
            get { return textBoxUnit.Text; }
            set { textBoxUnit.Text = value; }
        }
        public string Item
        {
            get { return textBoxItem.Text; }
            set { textBoxItem.Text = value; }
        }

        #endregion



        public ShoppingList()
        {
            InitializeComponent();
        }

        public event EventHandler CheckAllChanged = delegate { };
        public event EventHandler AddButtonClicked = delegate { };
        public event EventHandler DeleteButtonClicked = delegate { };


        private void checkBoxAll_CheckedChanged(object sender, EventArgs e)
        {
            CheckAllChanged(sender, e);
        }

        private void buttonAdd_Click(object sender, EventArgs e)
        {
            AddButtonClicked(sender, e);
        }

        private void buttonDelete_Click(object sender, EventArgs e)
        {
            DeleteButtonClicked(sender, e);
        }

        private void buttonPrint_Click(object sender, EventArgs e)
        {
            //not yet implemented
        }

        private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            //nothing needed yet
        }


    }
}